package entityManager

import (
	"gitee.com/fierce_wolf/go-fox-edge-common/commEntityManager"
	"gitee.com/fierce_wolf/go-fox-edge-common/commRedisService"
	"gitee.com/fierce_wolf/go-fox-edge-common/edgeEntity"
)

func Instance() {
	reader := commRedisService.IRedisManager.GetRedisReader()

	reader[edgeEntity.Type.UserEntity.Type()] = nil
	reader[edgeEntity.Type.UserRoleEntity.Type()] = nil
	reader[edgeEntity.Type.UserPermissionEntity.Type()] = nil
	reader[edgeEntity.Type.UserMenuEntity.Type()] = nil
	reader[edgeEntity.Type.ConfigEntity.Type()] = nil

	// 初始化数据库的字典
	var entityTypes []string
	for k1 := range reader {
		entityTypes = append(entityTypes, k1)
	}
}

func InitLoadEntity() {
	commEntityManager.InitLoadEntity()
}

// Scheduler 线程函数
func Scheduler() {
	commEntityManager.Scheduler()
}
